package net.luoran.dvm.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.luoran.dvm.entity.PanelDO;
import net.luoran.dvm.entity.PanelGroupDO;
import net.luoran.dvm.entity.PanelModuleDO;
import net.luoran.dvm.entity.SysFileDO;
import net.luoran.dvm.mapper.PanelGroupMapper;
import net.luoran.dvm.service.PanelGroupService;
import net.luoran.dvm.service.PanelModuleService;
import net.luoran.dvm.service.PanelService;
import net.luoran.dvm.service.SysFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 数据大屏组 服务实现类
 * </p>
 *
 * @author MyBatisPlusGenerater
 * @since 2020-10-29
 */
@Service
@Transactional
public class PanelGroupServiceImpl extends ServiceImpl<PanelGroupMapper, PanelGroupDO> implements PanelGroupService {

    @Autowired
    private PanelGroupMapper panelGroupMapper;

    @Override
    public void removeByGroupIds(List<Integer> groupIds) {
        panelGroupMapper.deleteBatchIds(groupIds);
    }

    @Override
    public void removeByGroupId(Integer groupId) {
        panelGroupMapper.deleteById(groupId);
    }

    @Override
    public void savePanelGroup(PanelGroupDO panelGroupDO) {
        panelGroupMapper.insert(panelGroupDO);
    }

    @Override
    public void saveOrUpdatePanelGroup(PanelGroupDO panelGroupDO) {
        panelGroupMapper.updateById(panelGroupDO);
    }
}
